/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Chiabai_total;

/**
 *
 * @author Oho
 */
public class LinearTweening {

    public static float funtionLinearTweening(float time, float b, float c, float d) {
        return c * time / d + b;
    }

    public static float functionQuadraticEasing(float time, float b, float c, float d) {
        return c * (time /= d) * time + b;
    }

    public static float functioneaseInQuad(float time, float b, float c, float d) {
        return -c * (time /= d) * time + b;
    }

    public static float easeInOutQuad(float t, float b, float c, float d) {
        if ((t /= d / 2) < 1) {
            return c / 2 * t * t + b;
        }
        return -c / 2 * ((--t) * (t - 2) - 1) + b;
    }

    public static float easeInSine(float t, float b, float c, float d) {
        return (float)( c * (1 - Math.cos(t / d * (Math.PI / 2))) + b);
    }
}
